#! /bin/bash

# Add Eudora to list of mail handlers in Menu > Preferences > Prefered Applications

BASEDIR=$(dirname $(readlink -f "${BASH_SOURCE[0]}"))

# Launcher
cp-deep "$BASEDIR/eudora.sh" "$HOME/bin/eudora"
chmod +x "$HOME/bin/eudora"
exit
# Icons
cp-deep "$BASEDIR/eudora16.png" "$HOME/.local/share/icons/hicolor/16x16/apps/eudora.png"
cp-deep "$BASEDIR/eudora32.png" "$HOME/.local/share/icons/hicolor/32x32/apps/eudora.png"
cp-deep "$BASEDIR/eudora48.png" "$HOME/.local/share/icons/hicolor/48x48/apps/eudora.png"

# Desktop
cp-deep "$BASEDIR/eudora.desktop" "$HOME/.local/share/applications/"

# Prefered Applications list
#sudo cp --no-preserve=mode,ownership "$BASEDIR/eudora.xml" "/usr/share/gnome-control-center/default-apps/"

# URI Handler
gconftool -t string -s /desktop/gnome/url-handlers/mailto/command 'eudora %s'
gconftool -t bool -s /desktop/gnome/url-handlers/mailto/needs_terminal false
gconftool -t bool -s /desktop/gnome/url-handlers/mailto/enabled true

# Eudora settings
#dir="/home/rodrigo/.local/share/wineprefixes/eudora/drive_c/Program Files/Qualcomm/Eudora"
#cp "$dir/extrastuff/esoteric.epi" "$dir/"
